<?php

$link = mysqli_connect("localhost","root","root","2113");
$messageId = $_POST['messageId'];

// 删除 message表格里的内容 
$sql = "DELETE FROM message WHERE id=$messageId";
// echo $sql;die;
$res =  mysqli_query($link,$sql);

// 删除和message关联的replay表的内容
$sql2 = "DELETE FROM relpay WHERE mid=$messageId";
mysqli_query($link,$sql2);

$arr = [];
if($res){
	$arr['status'] = 1;
	$arr['info'] = "删除成功";
}else{
	$arr['status'] = 0;
	$arr['info'] = "删除失败";
}
echo json_encode($arr);

?>